#include <iostream>
#include <string>
#include <vector>
using namespace std;

// 计算字符串的哈希值
unsigned long long stringHash(const string& s) {
    unsigned long long hash = 0;
    for (char c : s) {
        hash = hash * 131 + c;
    }
    return hash;
}

int main() {
    int n;
    while (scanf("%d", &n) && n != 0) {
        vector<string> names;
        unsigned long long xor_result = 0;
        
        for (int i = 0; i < 2 * n - 1; i++) {
            char name[25];
            scanf("%s", name);
            string str_name(name);
            names.push_back(str_name);
            xor_result ^= stringHash(str_name);
        }
        
        // 找到哈希值等于xor_result的姓名
        for (const string& name : names) {
            if (stringHash(name) == xor_result) {
                cout << name << endl;
                break;
            }
        }
    }
    
    return 0;
}